﻿using System;
using Cms.Application;

namespace Cms.Web.Framework.Controls
{
    public class AdminMaster : AdminBaseMaster, ITranslatable
    {
        public string HeadingText
        {
            get { return (string)ViewState["HeadingText"]; }
            set { ViewState["HeadingText"] = value; }
        }
        
        public string HeadingIcon
        {
            get { return (string)ViewState["HeadingIcon"]; }
            set { ViewState["HeadingIcon"] = value; }
        }

        #region ITranslatable Members

        public string ContextTranslationFile
        {
            get { return "Admin/Translations/AdminMaster.xml"; }
        }

        #endregion

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (!(Page is AdminPage))
                throw new ApplicationException("The Page must inherit from AdminPage to be able to use Admin.Master");
        }
    }
}